From 37d588ba4781179bff216d1c8a8f41bccb111388 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sat, 17 Jan 2009 10:43:32 +0000 Subject: [PATCH] New installed header file that contains portability macros. * babl/babl-macros.h: New installed header file that contains portability macros. * babl/babl.h: Include it and don't define portability macros here. * babl/Makefile.am: Add it. svn path=/trunk/; revision=367 --- ChangeLog | 10 ++++++++++ babl/Makefile.am | 2 ++ babl/babl-macros.h | 32 ++++++++++++++++++++++++++++++++ babl/babl.h | 8 ++------ 4 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 babl/babl-macros.h diff --git a/ChangeLog b/ChangeLog index ae74ca4..22312ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-01-17 Martin Nordholts + + * babl/babl-macros.h: New installed header file that contains + portability macros. + + * babl/babl.h: Include it and don't define portability macros + here. + + * babl/Makefile.am: Add it. + 2009-01-15 Martin Nordholts * babl/babl.h: Make BablClassType an int again, it doesn't make diff --git a/babl/Makefile.am b/babl/Makefile.am index 5b35869..c0a7c43 100644 --- a/babl/Makefile.am +++ b/babl/Makefile.am @@ -37,6 +37,7 @@ h_sources = \ babl-db.h \ babl-ids.h \ babl-internal.h \ + babl-macros.h \ babl-memory.h \ babl-util.h \ babl.h \ @@ -53,6 +54,7 @@ library_include_HEADERS = \ babl-fish.h \ babl-format.h \ babl-image.h \ + babl-macros.h \ babl-model.h \ babl-sampling.h \ babl-type.h \ diff --git a/babl/babl-macros.h b/babl/babl-macros.h new file mode 100644 index 0000000..7eae084 --- /dev/null +++ b/babl/babl-macros.h @@ -0,0 +1,32 @@ +/* babl - dynamically extendable universal pixel conversion library. + * Copyright (C) 2005-2008, Øyvind Kolås and others. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see + * . + */ + +#ifndef _BABL_MACROS_H +#define _BABL_MACROS_H + +#ifndef _BABL_H +#error this file is only to be included by babl.h +#endif + +#if __GNUC__ >= 4 +#define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__)) +#else +#define BABL_ARG_NULL_TERMINATED +#endif + +#endif diff --git a/babl/babl.h b/babl/babl.h index 74d9dba..dfc1790 100644 --- a/babl/babl.h +++ b/babl/babl.h @@ -30,6 +30,8 @@ #error babl.h included after babl-internal.h #endif +#include "babl-macros.h" + /* magic number used at the start of all babl objects, used to do * differentiation in polymorphic functions. (as well as manual * type check assertions). @@ -83,12 +85,6 @@ void babl_init (void); */ void babl_destroy (void); -#if __GNUC__ >= 4 -#define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__)) -#else -#define BABL_ARG_NULL_TERMINATED -#endif - typedef int (*BablEachFunction) (Babl *entry, void *data); -- 2.30.2